package com.pms.service.impl;


import java.util.Date;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.pms.dao.EmployeeDao;
import com.pms.pojo.Department;
import com.pms.pojo.Employee;
import com.pms.pojo.Post;
import com.pms.pojo.Probation;
import com.pms.service.EmployeeHiredService;

@Service("employeeHiredService")
public class EmployeeHiredServiceImpl implements EmployeeHiredService{

	@Resource(name="employeeDaoTest")
	EmployeeDao employeeDao;
	
	
	@Override
	public List<Post> getPosts() {
		List<Post> posts =  employeeDao.getPosts();
		return posts;
	}

	@Override
	public List<Department> getDpartments() {
		// TODO Auto-generated method stub
		
		List<Department> departments = employeeDao.getDpartments();
		
		return departments;
	}

	

	@Override
	public Integer findEmail(String email) {
		// TODO Auto-generated method stub
		
		Integer findEmail = this.employeeDao.findEmail(email);
		return findEmail;
	}

	@Override
	public Boolean addEmpInfoOne(Employee employee) {
		// TODO Auto-generated method stub
		Boolean tag = this.employeeDao.addEmployee(employee);
		
		return tag;
	}

	@Override
	public Employee findEmpInfoById(String empNum) {
		Employee employee = this.employeeDao.findEmpInfoById(empNum);
		return employee;
	}

	@Override
	public Boolean addEmpProbation(Probation probation) {
		// TODO Auto-generated method stub
		Boolean success = this.employeeDao.addProbation(probation);
		if(success) {
			return true;
		}else {
			return false;
		}
		
		
	}


	
}
